package com.mew.slots.core.common.messge.request;

import com.zebra.common.ZebraBaseMessage;
import io.netty.buffer.ByteBuf;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * @Author King.Song
 * @Date 2020/7/8 0022
 **/
@Data
@ToString(callSuper = true)
@NoArgsConstructor
public class EnterGameRequestMessage extends ZebraBaseMessage<EnterGameRequestMessage> {
    private int roomId;

    @Override
    public void write(ByteBuf b) {
        writeInt(b, this.roomId);
    }

    @Override
    public EnterGameRequestMessage read(ByteBuf b) {
        EnterGameRequestMessage requestMessage = new EnterGameRequestMessage();
        requestMessage.roomId = readInt(b);
        return requestMessage;
    }

}
